<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

 Route::get('/', function () {
     return view('welcome');
 });
// Route::get('/admin/index','admin\IndexController@index');




//后台登录界面路由
Route::any('/admin/login','admin\LoginController@login');
//后台登录界面验证码路由
Route::get('/admin/login/code','admin\LoginController@code');


//使用了中间件
Route::group(['middleware'=>['web','admin.login'],'prefix'=>'admin'],function(){
	//后台欢迎界面路由
	Route::get('index','admin\IndexController@index');
	//后台退出路由
	Route::get('quite','admin\LoginController@quite');
	//后台修改密码页面
	Route::any('editpass','admin\IndexController@editpass');

	//分类资源路由
    Route::resource('category','admin\CategoryController');
    //文章资源路由
    Route::resource('article','admin\ArticleController');
});